﻿@using ldc_mvc_closing_hwk.Models.Database

@{
}

@{
    var articleMeta = ViewBag.ArticleMeta as ArticleMetum;
    var articleContent = ViewBag.ArticleContent as ArticleContent;
    if (articleContent == null)
    {
        <h1 class="detail-title"> 这里没有内容 </h1>
        <div class="post_info">
            <span>2022-12-05 16:15:01</span>　来源: <span>新华社客户端</span>
        </div>
        <div class="post_content">
            内容已被删除
        </div>

        return;
    }
}

<h1 class="detail-title"> @articleMeta.Title </h1>
<div class="post_info">
    <span> @articleMeta.Title </span>　来源: <span> @articleMeta.SourceName </span>
</div>
@{

    if (articleContent.ContentType == "url")
    {
        <iframe src="@articleContent.Data" width="100%" height="800"></iframe>
    }
    else
    {
        <div class="post_content">@articleContent.Data</div>
    }
}